import React, { Component } from 'react'

export default class Child extends Component {
    // 加载完成之后
    componentDidMount() {
        // 标准来说是ajax写在这里
        console.log("Child-componentDidMount")
    }
    constructor() {
        super()
        console.log("Child-constructor")
    }
    render() {
        console.log("Child-render")
        return (
        <div>child</div>
        )
    }
    // 将要挂载
    UNSAFE_componentWillMount() {
        console.log("Child-UNSAFE_componentWillMount")
    }
}